home *** CD-ROM | disk | FTP | other *** search
/ CyberMycha Extra 2004 January / CyberMycha Extra 1-2004 (Poland) (Disc 2).bin / Pippi / gmgs.dir / Internal_16_score--hoppar.ls < prev    next >
Encoding:
Text File  |  2001-09-05  |  1.2 KB  |  47 lines

  1. property tix, tixV, zP, mmV, horseSprite, someThingUnderMe, randomDelayCounter
  2. global gmObject, sndObject
  3.  
  4. on beginSprite me
  5.   randomDelayCounter = 0
  6.   someThingUnderMe = 0
  7.   gmObject.backCounter = 30
  8.   horseSprite = gmObject.horseSprites[2]
  9.   tixV = 4
  10.   tix = the ticks + tixV
  11.   sndObject.respondSnd(2, 1, 1, 1)
  12. end
  13.  
  14. on exitFrame me
  15.   if (gmObject.speed > 0) and (gmObject.dontTrig < 2) then
  16.     randomDelayCounter = randomDelayCounter + 1
  17.     if randomDelayCounter > (3 - gmObject.overAllSpeed) then
  18.       randomDelayCounter = 0
  19.       gmObject.trigThings()
  20.     end if
  21.   end if
  22.   if someThingUnderMe = 0 then
  23.     if gmObject.intersectTestJump(sprite(55).rect + rect(100, 100, -100, -100)) = 1 then
  24.       someThingUnderMe = 1
  25.       gmObject.makeJumpSymbol()
  26.     end if
  27.   end if
  28.   if the ticks > gmObject.jumpTime then
  29.     if gmObject.intersectTest(gmObject.horseSideRect) = 0 then
  30.       gmObject.changeHorse(1)
  31.       sndObject.respondSnd(2, 4, 1, 1)
  32.     end if
  33.   end if
  34.   go(the frame)
  35. end
  36.  
  37. on idle
  38.   if the keyDownScript = EMPTY then
  39.     zP = horseSprite.locH
  40.     if the ticks > tix then
  41.       mmV = (the mouseH - zP) / 15
  42.       gmObject.mouseHX(mmV)
  43.       tix = the ticks + tixV
  44.     end if
  45.   end if
  46. end
  47.